home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / etc / init.d / bluetooth < prev    next >
Text File  |  2009-09-24  |  1KB  |  45 lines

  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: bluetooth
  4. # Required-Start:    $local_fs $syslog $remote_fs dbus
  5. # Required-Stop:     $local_fs $syslog $remote_fs
  6. # Default-Start:     2 3 4 5
  7. # Default-Stop:      0 1 6
  8. # Short-Description: Start bluetoothd
  9. ### END INIT INFO
  10.  
  11. . /lib/lsb/init-functions
  12.  
  13. set -e
  14.  
  15. case "$1" in
  16.   start)
  17.     #currently this init script exists only because of what appears to be
  18.     #an egg and chicken problem
  19.     #  bluetoothd normally starts up by udev rules.  it needs dbus to function,
  20.     #  but dbus doesn't start up until after udev finishes triggering
  21.     #
  22.     if [ ! -f /sbin/udevadm.upgrade ]; then
  23.       udevadm trigger --subsystem-match=bluetooth
  24.     fi
  25.     ;;
  26.   stop)
  27.     pkill -TERM bluetoothd || true
  28.     ;;
  29.   restart|force-reload)
  30.     $0 stop
  31.     $0 start
  32.     ;;
  33.   status)
  34.     status_of_proc "bluetoothd" "bluetooth" && exit 0 || exit $?
  35.     ;;
  36.   *)
  37.     N=/etc/init.d/bluetooth
  38.     # echo "Usage: $N {start|stop|restart|reload|force-reload|status}" >&2
  39.     echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
  40.     exit 1
  41.     ;;
  42. esac
  43.  
  44. exit 0
  45.